{% extends 'admin/base.html'%}

{% block body%}
<div class="container-fluid">

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <h4>添加管理员</h4>
                </div>
                <div class="card-body">
                    <form action="{{url_for('admin.add')}}" method="post" class="row" novalidate>
                        {{form.csrf_token}}
                        <div class="form-group col-md-12">
                            <label for="type">{{form.role_id.label}}</label>
                            <div class="form-controls">
                                {{form.role_id(class='form-control')}}
                            </div>
                        </div>
                        {% for message in form.role_id.errors%}
                        <div class="form-group col-md-12" style="color: #f96868!important;">{{message}}</div>
                        {% endfor %}
                        <div class="form-group col-md-12">
                            <label for="title">{{form.username.label}}</label>
                            {{form.username(class='form-control')}}
                        </div>
                        {% for message in form.username.errors%}
                        <div class="form-group col-md-12" style="color: #f96868!important;">{{message}}</div>
                        {% endfor %}

                        <div class="form-group col-md-12">
                            <label for="seo_keywords">{{form.password.label}}</label>
                            {{form.password(class='form-control')}}
                        </div>
                        {% for message in form.password.errors%}
                        <div class="form-group col-md-12" style="color: #f96868!important;">{{message}}</div>
                        {% endfor %}

                        <div class="form-group col-md-12">
                            <label for="seo_keywords">{{form.rpassword.label}}</label>
                            {{form.rpassword(class='form-control')}}
                        </div>
                        {% for message in form.rpassword.errors%}
                        <div class="form-group col-md-12" style="color: #f96868!important;">{{message}}</div>
                        {% endfor %}

                        <div class="form-group col-md-12">
                            <label for="status">状态</label>
                            <div class="clearfix">
                                <label class="lyear-radio radio-inline radio-primary">
                                    <input type="radio" name="status" value="1" checked><span>启用</span>
                                </label>
                                <label class="lyear-radio radio-inline radio-primary">
                                    <input type="radio" name="status" value="0"><span>禁用</span>
                                </label>
                            </div>
                        </div>
                        <div class="form-group col-md-12">
                            {{form.submit(class='btn btn-primary')}}
                            <a class="btn btn-default" href="{{url_for('admin.index')}}">返 回</a>
                        </div>

                    </form>

                </div>
            </div>
        </div>

    </div>

</div>
{% endblock%}